// import http from '../../utils/request/request'
import axios from "axios"
const http = axios.create({
    baseURL: 'http://120.77.156.205:9605/leader',
    timeout: 18000 // 请求超时时间
})
export function getOrdersCount() {
    return http({
        url: `/orders/count`,
        method: 'get'
    })
}

export function getOrdersCountGroupByCompany() {
    return http({
        url: `/orders/count/groupby/logisticsCompany`,
        method: 'get'
    })
}

export function getOrdersStatusByTime(startTime, endTime) {
    return http({
        url: `/orders/count/groupby/orderStatus?startTime=${startTime}&endTime=${endTime}`,
        method: 'get'
    })
}

export function getOrdersCountByCustomerType() {
    return http({
        url: `/orders/count/groupby/targetCustomerType`,
        method: 'get'
    })
}
export function getOrdersCountByProvince() {
    return http({
        url: `/orders/count/order/groupby/AddressProvince`,
        method: 'get'
    })
}
export function getOrdersCountByCity() {
    return http({
        url: `/orders/count/order/groupby/AddressCity`,
        method: 'get'
    })
}

export function getOrdersAmountByTime(startTime, endTime) {
    return http({
        url: `/orders/count/productAmount?startTime=${startTime}&endTime=${endTime}`,
        method: 'get'
    })
}


export function getWeatherInfo() {
    return axios.get(`/weather/forecast7d?city=23.12908,113.26436&key=iw03p4n92aieksao`);
}
// params: {
//     // city: lat + "," + lng,
//     city: "23.12908" + "," + "113.26436",
//     key: "pwft87o59d5qillf",
// },